# 定义任务的文件
from celery_tasks.sms.yuntongxun.ccp_sms import CCP
from celery_tasks.main import celery_app


@celery_app.task(name='ccp_send_sms_code')
def ccp_send_sms_code(mobile, sms_code):
    """
    发送短信异步任务
    :param mobile:
    :param sms_code:
    :return: 成功0，失败-1
    """
    ret = CCP().send_template_sms(mobile, [sms_code, 5], 1)
    return ret